package com.moon.test;

/**
 * @ClassName: Movie
 * @Description: 电影类
 * @Author: 郭正洋
 * @Date: 2022/10/10 10:20
 * @Vsersion: 1.0.0
 **/
public class Movie implements Comparable<Movie>{

	public String movieName;
	public int score;
	public Movie(String movieName, int score) {
		this.movieName = movieName;
		this.score = score;
	}

	@Override
	public String toString() {
		return "Movie{" +
				"movieName='" + movieName + '\'' +
				", score=" + score +
				'}';
	}


	@Override
	public int compareTo(Movie o) {
		return score > o.score ? -1 : 1;
	}
}
